
<script type="text/javascript" language="javascript" src="JavaScripts/js.html"></script>
<script type="text/javascript" language="javascript" src="JavaScripts/calendar.js"></script>
<script type="text/javascript" language="javascript" src="JavaScripts/form.js"></script>  
<script type="text/javascript" language="javascript">
  <!--
      var theme_path = 'images'; //set current theme path
      var delayTimeForMouseoverPopup = 500;
            //initialize mouse's focus when page located
  -->
  </script>


                    <input value="<?php echo date('Y-m-d');?>" id="duration" name="duration" type="hidden"><a class="datesformat">Run Dates</a>
                    <script type="text/javascript" language="javascript">
                    <!--
                    var obj = new Calendar("obj", 0, document.getElementById("duration"), "<?php echo date('Y-m-d');?>", "2007-12-12", "");
                    var adOnload = window.onload;
                    window.onload = function() {
                        if (adOnload) {
                            adOnload();
                        }
                        displayDays();
                    }

                    function displayDays() {                       
                        var daysObjects = document.getElementsByName("days");
			//alert(daysObjects.length);
                        for (var i = 0; i < daysObjects.length; i++) {
                            if (daysObjects[i].checked) {
				//alert(daysObjects[i].value);
				var initial_cal=daysObjects[i].value;
				var initial_cal_days=initial_cal.split(",");
				var initial_duration=initial_cal_days[0];
                                obj.showPeriod(initial_duration);
                                break;
                            }
                        }
                    }                    

                    function selectDate(daysObj) {
			//alert(daysObj.value);
			var cal=daysObj.value;
			var cal_days = cal.split(",");
			var duration=cal_days[0];
                        duration.checked = true;
                        obj.showPeriod(duration);
                    }
                    -->
                    </script>